#!/bin/bash

#. "$HOME/.bashrc"

filename=repo/.git/hooks/pre-push

bsh_(){
     . $HOME/.bashrc
}

bsh_ 1>/dev/null

echo -e "${HLIGHT}---start file: $filename---${NORMAL}" # start file


#----------

. "${COMMUNIS_PATH}/Deploy_store/.qa/sis_apps/sis_git.2/git_pre_push_fns.sh"

git_pre_push_bck_hooks

# c_up_ "$(pwd)"/.git/test/
# c_test_ "$(pwd)"

# rr_

starter_(){
    . "${COMMUNIS_PATH}/Deploy_store/.qa/lib/stl_tmp/stl_tmp.tst"
}

aggr_(){
    starter_
}

# check_all_tst(){
#     echo -e "${GREEN}\$(pwd) = $(pwd)${NORMAL}" #print variable
# }
check_all_tst ${COMMUNIS_PATH}/Deploy_store/.qa

# if [ "$(check_all_tst)" ]; then
# echo -e "${BLUE}---INIT0 patch with EXIT 0---${NORMAL}" #sistem info mesage
#     exit 0
# else
# echo -e "${RED}---INIT0 patch with EXIT 1---${NORMAL}" #sistem info mesage
#     exit 1
# fi

if [ "$(aggr_)" ]; then
echo -e "${BLUE}---INIT0 patch with EXIT 0---${NORMAL}" #sistem info mesage
    exit 0
else
echo -e "${RED}---INIT0 patch with EXIT 1---${NORMAL}" #sistem info mesage
    exit 1
fi

# echo -e "${GREEN}\$(all_test) = $(all_test)${NORMAL}" #print variable

# if [ "$(all_test)" -ne 0 ];then
#     echo -e "${BLUE}---true all_test---${NORMAL}" #sistem info mesage
#     exit 0
# else
#     echo -e "${BLUE}---false all_test---${NORMAL}" #sistem info mesage
#     exit 1
# fi

#----------
#----------------------------
#------------------------------------------------------
unset filename

# exit 0